home *** CD-ROM | disk | FTP | other *** search
/ Aminet 28 / Aminet 28 (1998)(GTI - Schatztruhe)[!][Dec 1998].iso / Aminet / disk / cdrom / muicd.lha / MUI_CD_Player / MUI_CD_Player.install < prev    next >
Encoding:
Text File  |  1998-09-29  |  11.4 KB  |  445 lines

  1. ; MUI_CD_Player Installer script
  2.  
  3. ; Some procedures
  4.  
  5. (procedure P_COPYINFO #infoname
  6.   (copyfiles
  7.     (prompt #copying)
  8.     (source #infoname)
  9.     (dest @default-dest)
  10.     (help @copyfiles-help)
  11.     (infos)
  12.   )
  13. )
  14.  
  15. (procedure P_DEVICEINFO
  16.   (cat #dev (getenv "TSTDEV_DEVICE") "\n" 
  17.        #unit (getenv "TSTDEV_UNIT") "\n"
  18.        #devtype (getenv "TSTDEV_DEVICETYPE") "\n"
  19.        #commandset (getenv "TSTDEV_COMMANDSET") "\n"
  20.        #vendor (getenv "TSTDEV_VENDOR") "\n"
  21.        #product (getenv "TSTDEV_PRODUCT") "\n"
  22.        #revision (getenv "TSTDEV_REVISION")
  23.   )
  24. )
  25.  
  26. (procedure P_FINDBYVOLUME #userlevel
  27.   (if (= #userlevel 0)
  28.     (set #ret (run "testdevice CD0: volume setvar"))
  29.     (set #ret (run (cat "testdevice " (askstring (prompt #entercdname) (help @askstring-help) (default "CD0:")) " volume setvar")))
  30.   )
  31.  
  32.   (if (= #ret 0)
  33.     (if (= (getenv "TSTDEV_DEVICETYPE") "CD-ROM")
  34.       (if (< #userlevel 2)
  35.         (set #goon 1)
  36.         (set #goon 
  37.           (askbool 
  38.             (prompt
  39.               (cat #found "\n\n" (P_DEVICEINFO) "\n\n\n" #isok)
  40.             )
  41.             (help @askbool-help)
  42.             (default 1)
  43.           )
  44.         )
  45.       )  
  46.       (if (= #userlevel 0)
  47.         (set #goon 0)
  48.         (set #goon
  49.           (askbool 
  50.             (prompt
  51.               (cat #foundnotcd "\n\n" (P_DEVICEINFO) "\n\n\n" #isok)
  52.             )
  53.             (help @askbool-help)
  54.             (default 1)
  55.           )
  56.         )  
  57.       )
  58.     )
  59.     ((set #goon 0) (message #notfound (all)))
  60.   )
  61. )
  62.  
  63. (procedure P_FINDBYDEVICE
  64.   (
  65.     (set #name
  66.       (cat "testdevice NAME=" 
  67.         (askstring (prompt #findbydev) (help @askstring-help)
  68.         (default "atapi.device"))
  69.         " "
  70.         (askstring (prompt #unitnum) (help @askstring-help)
  71.         (default ""))
  72.         " setvar"
  73.       )
  74.     )
  75.     (working #search)
  76.     (set #ret (run #name))
  77.     (if (= #ret 0)
  78.       (if (< @user-level 2)
  79.         (set #goon 1)
  80.         (set #goon 
  81.           (askbool 
  82.             (prompt
  83.               (cat #found "\n\n" (P_DEVICEINFO) "\n\n\n" #isok)
  84.             )
  85.             (help @askbool-help)
  86.             (default 1)
  87.           )
  88.         )  
  89.       )
  90.       (set #goon 0)
  91.     )
  92.   )
  93. )
  94.  
  95. (procedure P_CONFIGURECD
  96.   (working #search)
  97.  
  98.   (P_FINDBYVOLUME @user-level)
  99.  
  100.   (if (= #goon 0)
  101.     (if (= @user-level 0)
  102.       (P_FINDBYVOLUME 1)
  103.     )
  104.   )
  105.  
  106.   (if (= #goon 0)
  107.     (P_FINDBYDEVICE)
  108.   )
  109.  
  110.   (if (= #goon 0) (abort #notfound))
  111.   
  112.   (tooltype
  113.     (dest (tackon @default-dest "MUI_CD_Player"))
  114.     (settooltype "DEVICE" (getenv "TSTDEV_DEVICE"))
  115.     (settooltype "UNIT" (getenv "TSTDEV_UNIT"))
  116.     (settooltype "LIBRARY"
  117.       (if (= (getenv "TSTDEV_COMMANDSET") "CD32") "CDPlayers/cddevplay.library" "CDPlayers/atapiplay.library")
  118.     )
  119.   )
  120. )
  121.  
  122. (procedure P_COPYICON #filename
  123.   (if (exists (tackon @default-dest #filename))
  124.     (if (NOT (exists (tackon @default-dest (cat #filename ".info"))))
  125.       (copyfiles
  126.         (prompt #copying)
  127.         (source (cat #filename ".info"))
  128.         (dest @default-dest)
  129.         (help @copyfiles-help)
  130.       )
  131.     )
  132.   )
  133. )
  134.  
  135. (procedure P_COPYDIR #directory
  136.   (copyfiles
  137.     (prompt #copying)
  138.     (source #directory)
  139.     (all)
  140.     (dest (tackon @default-dest #directory))
  141.     (help @copyfiles-help)
  142.   )
  143. )
  144.  
  145. (procedure P_COPYPLAYER #player
  146.   (copylib
  147.     (prompt #copying)
  148.     (source (tackon "CDPlayers/" #player))
  149.     (dest (tackon @default-dest "CDPlayers"))
  150.     (help @copylib-help)
  151.     (if (= @user-level 2) (confirm))
  152.   )
  153. )
  154.  
  155. (procedure P_MAKEDIR #directory
  156.   (if (NOT (exists (tackon @default-dest #directory)))
  157.     (makedir (tackon @default-dest #directory))
  158.   )
  159. )
  160.  
  161.  
  162. ; Here the installation script begins
  163.  
  164. (welcome)
  165.  
  166. (set #language 
  167.   (if (= @language "polski") 1 
  168.     (if (= @language "deutsch") 2 
  169.       (if (= @language "italiano") 3 0)
  170.     )
  171.   )
  172. )
  173.  
  174. ; * STRING TRANSLATIONS *
  175.  
  176. ; English translation
  177.  
  178. (select #language
  179.   (
  180.     (set #search "Searching for CD-ROM...")
  181.     (set #found "Found a CD-ROM drive:")
  182.     (set #dev "Device: ")
  183.     (set #unit "Unit: ")
  184.     (set #vendor "Vendor: ")
  185.     (set #product "Product: ")
  186.     (set #revision "Revision: ")
  187.     (set #devtype "Device type: ")
  188.     (set #commandset "Command set: ")
  189.     (set #foundnotcd "Found a device which is probably not a CD-ROM:")
  190.     (set #isok "Use this device ?")
  191.     (set #notfound "Could not find a CD-ROM")
  192.     (set #entercdname "Enter the name of your CD-ROM\n(eg. CD0, CD1, CDR etc.)")
  193.     (set #findbydev "Let's try to find the CD-ROM differently.\nEnter the device name:")
  194.     (set #unitnum "Enter unit number:\n(or leave it empty if you don't know the number)")
  195.  
  196.     (set #askdir "Select where MUI_CD_Player drawer should be created")
  197.     (set #installprompt "Please confirm if you'd like to install these")
  198.     (set #cds "Additional CDs in text files")
  199.     (set #copying "Copying files...")
  200.     (set #imagebutprompt "Which image buttons would you like to install ?")
  201.     (set #askconf "Would you like to configure your CD-ROM now ?")
  202.     (set #installtprompt "Please confirm if you'd like to install these translations")
  203.     (set #excds "Example CDs to import")
  204.   )
  205.  
  206. ; Polish translation
  207.  
  208.   (
  209.     (set #search "Szukam CD-ROMu...")
  210.     (set #found "Znalazîem CD-ROM:")
  211.     (set #dev "Urzâdzenie: ")
  212.     (set #unit "Nr: ")
  213.     (set #vendor "Producent: ")
  214.     (set #product "Produkt: ")
  215.     (set #revision "Wersja: ")
  216.     (set #devtype "Typ urzâdzenia: ")
  217.     (set #commandset "Zestaw komend: ")
  218.     (set #foundnotcd "Znalazîem urzâdzenie, które prawdopodobnie nie jest CD-ROMem:")
  219.     (set #isok "Czy mam uûyê tych danych ?")
  220.     (set #notfound "Nie mogë znaleúê CD-ROMu")
  221.     (set #entercdname "Wpisz nazwë CD-ROMu\(czyli np. CD0, CD1, CDR itp.)")
  222.     (set #findbydev "Spróbujmy znaleúê CD-ROM w inny sposób.\nWpisz nazwë urzâdzenia:")
  223.     (set #unitnum "Wpisz numer urzâdzenia:\n(albo pozostaw to pole puste jeôli nie znasz numeru)")
  224.  
  225.     (set #askdir "Wskaû miejsce gdzie mam utworzyê katalog MUI_CD_Player")
  226.     (set #installprompt "Proszë zaznaczyê co chciaîbyô zainstalowaê")
  227.     (set #cds "Dodatkowe kompakty w plikach tekstowych")
  228.     (set #copying "Kopiujë pliki...")
  229.     (set #imagebutprompt "Jakie przyciski chciaîbyô zainstalowaê ?")
  230.     (set #askconf "Czy chciaîbyô teraz skonfigurowaê Twój CD-ROM ?")
  231.     (set #installtprompt "Proszë zaznaczyê które jëzyki chciaîbyô zainstalowaê")
  232.     (set #excds "Przykîadowe kompakty do zaimportowania")
  233.   )
  234.  
  235. ; German translation
  236.  
  237.   (
  238.     (set #search "Suche nach einem CD-ROM...")
  239.     (set #found "Es wurde ein CD-ROM Laufwerk gefunden:")
  240.     (set #dev "Device: ")
  241.     (set #unit "Unit: ")
  242.     (set #vendor "Hersteller: ")
  243.     (set #product "Produkt: ")
  244.     (set #revision "Revision: ")
  245.     (set #devtype "Geräte-Typ: ")
  246.     (set #commandset "Befehlssatz: ")
  247.     (set #foundnotcd "Es wurde ein Gerät gefunden, das vermutlich kein CD-ROM ist:")
  248.     (set #isok "Dieses Gerät verwenden?")
  249.     (set #notfound "Ein CD-ROM konnte nicht gefunden werden")
  250.     (set #entercdname "Geben Sie den Namen Ihres CD-ROM ein\n(z.B. CD0, CD1, CDR etc.)")
  251.     (set #findbydev "Wir versuchen jetzt, das CD-ROM auf eine andere Weise zu finden.\nGeben Sie den Device-Namen ein:")
  252.     (set #unitnum "Geben Sie die Unit-Nummer ein:\n(oder lassen Sie das Feld leer, falls Sie die Nummer nicht wissen)")
  253.  
  254.     (set #askdir "Wählen Sie, wo die MUI_CD_Player-Schublage erzeugt werden soll")
  255.     (set #cds "Zusätzliche CDs in Text-Dateien")
  256.     (set #copying "Kopiere Dateien...")
  257.     (set #imagebutprompt "Welche Symbole für die Knöpfe möchten Sie installieren?")
  258.     (set #askconf "Möchten Sie MUI CD jetzt für Ihr CD-ROM konfigurieren?")
  259.     (set #installprompt "Please confirm if you'd like to install these")
  260.     (set #installtprompt "Please confirm if you'd like to install these translations")
  261.     (set #excds "Example CDs to import")
  262.   )
  263.  
  264.  
  265. ; Italian translation
  266.  
  267.   (
  268.     (set #search "Ricerco il tuo CD-ROM...")
  269.     (set #found "Trovato drive CD-ROM :")
  270.     (set #dev "Dispositivo: ")
  271.     (set #unit "Unita`: ")
  272.     (set #vendor "Venditore: ")
  273.     (set #product "Prodotto: ")
  274.     (set #revision "Revisione: ")
  275.     (set #devtype "Tipo Dispositivo: ")
  276.     (set #commandset "Comandi disponibili: ")
  277.     (set #foundnotcd "Il dispositivo trovato probabilmente non e` un CD-ROM:")
  278.     (set #isok "Devo usare questo dispositivo ?")
  279.     (set #notfound "Non riesco a trovare un CD-ROM")
  280.     (set #entercdname "Digita il nome del tuo CD-ROM\n(es. CD0, CD1, CDR ecc.)")
  281.     (set #findbydev "Cerco di trovare il CD-ROM in altro modo.\nDigita nome dispositivo:")
  282.     (set #unitnum "Digita numero unita`:\n(o lascialo vuoto se non lo conosci !)")
  283.  
  284.     (set #askdir "Seleziona dove vuoi creare il cassetto per MUI_CD_Player")
  285.     (set #installprompt "Prego, conferma se vuoi installare anche questi")
  286.     (set #cds "CDs addizionali in formato testo")
  287.     (set #copying "Copio files...")
  288.     (set #imagebutprompt "Quali immagini vuoi installare per i pulsanti ?")
  289.     (set #askconf "Vuoi configurare il tuo CD-ROM adesso ?")
  290.     (set #installtprompt "Prego, conferma se vuoi installare queste traduzioni")
  291.     (set #excds "Esempio di CDs da importare")
  292.   )
  293.  
  294. )
  295.  
  296. (if (> @user-level 0)
  297.   (set #destdir
  298.     (askdir
  299.       (prompt #askdir)
  300.       (help @askdir-help)
  301.       (default @default-dest)
  302.     )
  303.   )
  304.   (set #destdir @default-dest)
  305. )
  306.  
  307. (P_MAKEDIR "MUI_CD_Player")
  308. (if (NOT (exists (tackon @default-dest "MUI_CD_Player.info")))
  309.   (copyfiles
  310.     (prompt #copying)
  311.     (source "/MUI_CD_Player.info")
  312.     (dest @default-dest)
  313.     (help @copyfiles-help)
  314.   )
  315. )
  316.  
  317. (set @default-dest (tackon #destdir "MUI_CD_Player"))
  318.  
  319. (P_MAKEDIR "Programs")
  320. (P_MAKEDIR "Disks")
  321. (P_MAKEDIR "Images")
  322. (P_MAKEDIR "Catalogs")
  323.  
  324. (set opts
  325.   (if (> @user-level 0)
  326.     (askoptions
  327.       (prompt #installtprompt)
  328.       (help @askoptions-help)
  329.       (choices "English" "Polski" "Deutch" "Italiano" "Hrvatski" "Français")
  330.       (default (BITOR (shiftleft 1 #language) 1))
  331.     )
  332.     (BITOR (shiftleft 1 #language) 1)
  333.   )
  334. )
  335.  
  336. (set opts2
  337.   (if (> @user-level 0)
  338.     (askoptions
  339.       (prompt #installprompt)
  340.       (help @askoptions-help)
  341.       (choices #excds #cds)
  342.       (default 3)
  343.     )
  344.     3
  345.   )
  346. )
  347.  
  348. (if (IN opts 0)
  349.   (copyfiles
  350.     (prompt #copying)
  351.     (source "MUI_CD_Player.guide")
  352.     (dest @default-dest)
  353.     (help @copyfiles-help)
  354.     (infos)
  355.   )
  356. )
  357.  
  358. (if (IN opts 1)
  359.   (
  360.     (P_COPYINFO "MUI_CD_Player.pl.guide")
  361.     (P_COPYDIR "catalogs/polski")
  362.   )
  363. )
  364.  
  365. (if (IN opts 2)
  366.   (
  367.     (P_COPYINFO "MUI_CD_Player.de.guide")
  368.     (P_COPYDIR "catalogs/deutsch")
  369.   )
  370. )
  371.  
  372. (if (IN opts 3)
  373.   (P_COPYDIR "catalogs/italiano")
  374. )
  375.  
  376. (if (IN opts 4)
  377.   (P_COPYDIR "catalogs/hrvatski")
  378. )
  379.  
  380. (if (IN opts 5)
  381.   (P_COPYDIR "catalogs/français")
  382. )
  383.  
  384. (if (IN opts2 0)
  385.   (copyfiles
  386.     (prompt #copying)
  387.     (source "CDs.MCD")
  388.     (dest @default-dest)
  389.     (help @copyfiles-help)
  390.   )
  391. )
  392. (if (IN opts2 1) (P_COPYDIR "Texts"))
  393.  
  394. (P_COPYINFO "RELEASE NOTES")
  395.  
  396. (copyfiles
  397.   (prompt #imagebutprompt)
  398.   (source "Images")
  399.   (all)
  400.   (dest (tackon @default-dest "Images"))
  401.   (help @copyfiles-help)
  402.   (confirm 1)
  403. )
  404.  
  405. (P_COPYPLAYER "atapiplay.library")
  406. (P_COPYPLAYER "cddevplay.library")
  407.  
  408. (copyfiles
  409.   (prompt #copying)
  410.   (source "")
  411.   (choices "MUI_CD_Player" "CD_Manager" "CD_Editor")
  412.   (dest @default-dest)
  413.   (help @copyfiles-help)
  414.   (if (= @user-level 2) (confirm))
  415. )
  416.  
  417. (copyfiles
  418.   (prompt #copying)
  419.   (source "")
  420.   (choices "testdevice" "Configure CD-ROM")
  421.   (dest @default-dest)
  422.   (help @copyfiles-help)
  423.   (if (= @user-level 2) (confirm))
  424. )
  425.  
  426. (P_COPYICON "MUI_CD_Player")
  427. (P_COPYICON "CD_Manager")
  428. (P_COPYICON "Configure CD-ROM")
  429.  
  430. (if (= @user-level 0)
  431.   (P_CONFIGURECD)
  432.   (if
  433.     (askbool 
  434.       (prompt #askconf)
  435.       (help @askbool-help)
  436.       (default 1)
  437.     )
  438.     (P_CONFIGURECD)
  439.   )
  440. )
  441.  
  442. (run "avail >nil: flush")
  443.  
  444. (exit)
  445.